﻿using UnityEngine;
using UnityEditor;

public interface IMassageManager
{
    /// <summary>
    /// 弹出一个消息终端
    /// </summary>
    /// <param name="go"></param>
    /// <returns></returns>
    IMessageTerminal PopMessageTerimal(GameObject go);

    /// <summary>
    /// 通过ID获取到终端
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    IMessageTerminal GetMessageTerimalByID(int id);

    /// <summary>
    /// 注册消息与终端的映射关系
    /// </summary>
    /// <param name="messageType"></param>
    /// <param name="messageTerminal"></param>
    void RegisterMessage(string messageType,IMessageTerminal messageTerminal);

    /// <summary>
    /// 注销消息与终端的映射关系
    /// </summary>
    /// <param name="messageType"></param>
    /// <param name="messageTerminal"></param>
    void UnRegisterMessage(string messageType, IMessageTerminal messageTerminal);

    /// <summary>
    /// 注销消息终端
    /// </summary>
    /// <param name="messageTerminal"></param>
    void UnRegisterMessageTerminal(IMessageTerminal messageTerminal);


    /// <summary>
    /// 发送消息
    /// </summary>
    /// <param name="messageType"></param>
    /// <param name="args"></param>
    void SendMessage(string messageType, IMessageArgs args);
}